3.12 \(\int \frac{\csc (x)}{a \cos (x)+b \sin (x)} \, dx\)

Optimal. Leaf size=23 \[ \frac{\log (\sin (x))}{a}-\frac{\log (a \cos (x)+b \sin (x))}{a} \]

[Out]

Log[Sin[x]]/a - Log[a*Cos[x] + b*Sin[x]]/a

________________________________________________________________________________________

Rubi [A]  time = 0.0698094, antiderivative size = 23, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3101, 3475, 3133} \[ \frac{\log (\sin (x))}{a}-\frac{\log (a \cos (x)+b \sin (x))}{a} \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]/(a*Cos[x] + b*Sin[x]),x]

[Out]

Log[Sin[x]]/a - Log[a*Cos[x] + b*Sin[x]]/a

Rule 3101

Int[1/(sin[(c_.) + (d_.)*(x_)]*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])), x_Symbol] :>
Dist[1/a, Int[Cot[c + d*x], x], x] - Dist[1/a, Int[(b*Cos[c + d*x] - a*Sin[c + d*x])/(a*Cos[c + d*x] + b*Sin[c
 + d*x]), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3133

Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)])/((a_.) + cos[(d_.) + (e_.)*(x_)]*(
b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> Simp[((b*B + c*C)*x)/(b^2 + c^2), x] + Simp[((c*B - b*C)*L
og[a + b*Cos[d + e*x] + c*Sin[d + e*x]])/(e*(b^2 + c^2)), x] /; FreeQ[{a, b, c, d, e, A, B, C}, x] && NeQ[b^2
+ c^2, 0] && EqQ[A*(b^2 + c^2) - a*(b*B + c*C), 0]

Rubi steps

\begin{align*} \int \frac{\csc (x)}{a \cos (x)+b \sin (x)} \, dx &=\frac{\int \cot (x) \, dx}{a}-\frac{\int \frac{b \cos (x)-a \sin (x)}{a \cos (x)+b \sin (x)} \, dx}{a}\\ &=\frac{\log (\sin (x))}{a}-\frac{\log (a \cos (x)+b \sin (x))}{a}\\ \end{align*}

Mathematica [A]  time = 0.0453793, size = 20, normalized size = 0.87 \[ \frac{\log (\sin (x))-\log (a \cos (x)+b \sin (x))}{a} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]/(a*Cos[x] + b*Sin[x]),x]

[Out]

(Log[Sin[x]] - Log[a*Cos[x] + b*Sin[x]])/a

________________________________________________________________________________________

Maple [A]  time = 0.076, size = 21, normalized size = 0.9 \begin{align*} -{\frac{\ln \left ( a+b\tan \left ( x \right ) \right ) }{a}}+{\frac{\ln \left ( \tan \left ( x \right ) \right ) }{a}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)/(a*cos(x)+b*sin(x)),x)

[Out]

-1/a*ln(a+b*tan(x))+1/a*ln(tan(x))

________________________________________________________________________________________

Maxima [B]  time = 1.14257, size = 65, normalized size = 2.83 \begin{align*} -\frac{\log \left (-a - \frac{2 \, b \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac{a \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right )}{a} + \frac{\log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)/(a*cos(x)+b*sin(x)),x, algorithm="maxima")

[Out]

-log(-a - 2*b*sin(x)/(cos(x) + 1) + a*sin(x)^2/(cos(x) + 1)^2)/a + log(sin(x)/(cos(x) + 1))/a

________________________________________________________________________________________

Fricas [A]  time = 0.503741, size = 123, normalized size = 5.35 \begin{align*} -\frac{\log \left (2 \, a b \cos \left (x\right ) \sin \left (x\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + b^{2}\right ) - \log \left (-\frac{1}{4} \, \cos \left (x\right )^{2} + \frac{1}{4}\right )}{2 \, a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)/(a*cos(x)+b*sin(x)),x, algorithm="fricas")

[Out]

-1/2*(log(2*a*b*cos(x)*sin(x) + (a^2 - b^2)*cos(x)^2 + b^2) - log(-1/4*cos(x)^2 + 1/4))/a

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc{\left (x \right )}}{a \cos{\left (x \right )} + b \sin{\left (x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)/(a*cos(x)+b*sin(x)),x)

[Out]

Integral(csc(x)/(a*cos(x) + b*sin(x)), x)

________________________________________________________________________________________

Giac [A]  time = 1.18594, size = 30, normalized size = 1.3 \begin{align*} -\frac{\log \left ({\left | b \tan \left (x\right ) + a \right |}\right )}{a} + \frac{\log \left ({\left | \tan \left (x\right ) \right |}\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)/(a*cos(x)+b*sin(x)),x, algorithm="giac")

[Out]

-log(abs(b*tan(x) + a))/a + log(abs(tan(x)))/a